#include "led.h"
#include "beep.h"
#include "sys.h"
#include "delay.h"
#include "key.h"

int main()
{
	ledinit();
	beepinit();
	keyinit();
	beep=1;
 led0=0;		//PB.5 输出低 LED亮
 led1=1;		//PE.5 
 u8 key;
 u16 i;
	while(1)
	{
		key=keyscan(0);
		if(key)
		{
			switch(key)
			{
				case wkuppres:beep=!beep;break;
				case key0pres:led0=!led0;break;
				case key1pres:led1=!led1;break;
			}
		}
		else delay_ms(10);
	}
}
void SystemInit()
{

}
